import { Route, Redirect, Switch } from 'react-router-dom'
import arr from './config'
import React from 'react'

 export default function router (props) {
  return (
    <Switch>
      {arr.map(d => (
        <Route key={d.key} path={`/${d.url}`} component={d.component}/>
      ))}
      <Redirect from='./' to='/go' />
    </Switch>
  )
}
